package com.pan.admin.module.log.controller;

import com.pan.admin.common.core.controller.BaseController;
import com.pan.admin.common.core.page.TableDataInfo;
import com.pan.admin.module.log.entity.SmsLog;
import com.pan.admin.module.log.service.SmsLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 短信日志记录
 *
 * @author gwc
 * @create 2025-08-05 下午5:35
 */

@RestController
@RequestMapping("/log/smslog")
public class SmsLogController extends BaseController {

    @Autowired
    private SmsLogService smsSmsLogService;

    /**
     * 查询日志 根据条件模糊查询
     *
     * @param smsLog 日志信息实体类
     * @return
     */
    @PreAuthorize("@ss.hasPermi('log:smslog:list')")
    @GetMapping("/list")
    public TableDataInfo list(SmsLog smsLog) {
        startPage();
        List<SmsLog> list = smsSmsLogService.list(smsLog);
        return getDataTable(list);
    }
}